]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
keyboard: Use translation-y property for focus window animations
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 11 Feb 2021 23:53:21 +0000 (00:53 +0100)
committerMarge Bot <marge-bot@gnome.org>
Wed, 17 Feb 2021 15:45:01 +0000 (15:45 +0000)
Just the intermediate state, we still need to synchronize visual and
real window position after the animation.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1668>

js/ui/keyboard.js

index a5304edace9828060fa8405fe03d56ce4485cd1f..ae3cdd35c264c54f5769396c0a2f959647bad3f1 100644 (file)
@@ -1856,6 +1856,10 @@ var Keyboard = GObject.registerClass({
 
     _windowSlideAnimationComplete(window, delta) {
         // Synchronize window positions again.
+        const windowActor = window.get_compositor_private();
+        if (windowActor)
+            windowActor.translation_y = 0;
+
         let frameRect = window.get_frame_rect();
         frameRect.y += delta;
         window.move_frame(true, frameRect.x, frameRect.y);
@@ -1869,7 +1873,7 @@ var Keyboard = GObject.registerClass({
 
         if (show) {
             windowActor.ease({
-                y: windowActor.y - deltaY,
+                translation_y: -deltaY,
                 duration: KEYBOARD_ANIMATION_TIME,
                 mode: Clutter.AnimationMode.EASE_OUT_QUAD,
                 onComplete: () => {
@@ -1878,7 +1882,7 @@ var Keyboard = GObject.registerClass({
             });
         } else {
             windowActor.ease({
-                y: windowActor.y + deltaY,
+                translation_y: deltaY,
                 duration: KEYBOARD_ANIMATION_TIME,
                 mode: Clutter.AnimationMode.EASE_IN_QUAD,
                 onComplete: () => {